xend: Fix VDI.get_record
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 15 Sep 2009 08:26:08 +0000 (09:26 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 15 Sep 2009 08:26:08 +0000 (09:26 +0100)
We cannot get correct records of VDI by VDI.get_record.
The correct records of VDI are gotten by this patch.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendVDI.py

index 0ef432b303e32bca108c5dd179b18a765bf54113..fa3d1479517128625c4c8d6b169ac6ef9d04de60 100644 (file)
@@ -60,7 +60,8 @@ class XendVDI(AutoSaveObject):
                  'virtual_size',
                  'physical_utilisation',
                  'sharable',
-                 'read_only']
+                 'read_only',
+                 'type']
 
     SAVED_CFG_INT = ['sector_size', 'virtual_size', 'physical_utilisation']
     
@@ -155,11 +156,12 @@ class XendVDI(AutoSaveObject):
                 'name_description': self.name_description,
                 'virtual_size': self.virtual_size,
                 'physical_utilisation': self.physical_utilisation,
-                'sharable': False,
-                'readonly': False,
+                'sharable': self.sharable,
+                'read_only': self.read_only,
+                'type': self.type,
                 'SR': self.sr_uuid,
                 'other_config': self.other_config,
-                'VBDs': []}
+                'VBDs': self.vbds}
 
     def get_location(self):
         raise NotImplementedError()